<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 应用配置
 */
namespace app\allwin\validate;
use think\Validate;

class Ecard extends Validate{

    protected $rule = [
        'member_miniapp_id' => 'require',
        'brand_name'        => 'require',
        'title'             => 'require',
        'notice'            => 'require',
        'description'       => 'require',
        'quantity'          => 'require',
        'color'             => 'require',
        'picture'           => 'require',
        'prerogative'       => 'require',
    ];

    protected $message = [
        'member_miniapp_id' => '应用ID丢失',
        'brand_name'        => '商户名称必须填写',
        'title'             => '卡券名称必须填写',
        'notice'            => '使用提醒必须填写',
        'description'       => '使用说明必须填写',
        'quantity'          => '库存数量必须填写',
        'color'             => '券颜色必须填写',
        'picture'           => '图片必须选择',
        'prerogative'       => '特权说明必须填写',
    ];

    protected $scene = [
        'edit' => ['member_miniapp_id','brand_name','title','notice','description','quantity','color','picture','prerogative'],
    ];
}